<?php
/**
 * 自定义的行为类
 *
 * Created by PhpStorm.
 * User: yss
 * Date: 2018/1/16
 * Time: 21:23
 */

namespace backend\components;


use Yii;
use yii\base\ActionFilter;

class MyBehavior extends ActionFilter
{
    public function beforeAction($action)
    {
        var_dump(111);
        return true;
    }

    public function isGuest ()
    {
        return Yii::$app->user->isGuest;
    }

}